package lily.phs.child;


import lily.phs.object.HereTipa;
import lily.phs.object.OneChild;
import lily.phs.urh.R;
import lily.ui.control.MyPopupWindow;



import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.text.InputType;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
import android.view.WindowManager.LayoutParams;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RelativeLayout;
import android.widget.ScrollView;

/**
 * @author chen
 *该类用于显示和保存“1岁以内儿童健康检查记录表”中前半部分内容
 */
public class SmallOneChildView extends RelativeLayout implements OnFocusChangeListener,OnClickListener{
	View v;
	Paint paint;
	private Context myContext;
	private LinearLayout ll1;
	private int profileid;
	MyPopupWindow mPopupWindow;
	//ScrollView sv;
	private RadioButton rb_w_up_1,rb_w_up_2,rb_w_up_3,rb_w_up_4,rb_w_middle_1,rb_w_middle_2,rb_w_middle_3,rb_w_middle_4,rb_w_down_1,rb_w_down_2,rb_w_down_3,rb_w_down_4,
						rb_h_up_1,rb_h_up_2,rb_h_up_3,rb_h_up_4,rb_h_middle_1,rb_h_middle_2,rb_h_middle_3,rb_h_middle_4,rb_h_down_1,rb_h_down_2,rb_h_down_3,rb_h_down_4,
						rb_hong_1,rb_hong_2,rb_hong_3,rb_hong_4,rb_huang_1,rb_huang_2,rb_other_1,rb_other_2,rb_other_3,rb_other_4,
						rb_skin_no_1,rb_skin_no_2,rb_skin_no_3,rb_skin_no_4,rb_skin_yes_1,rb_skin_yes_2,rb_skin_yes_3,rb_skin_yes_4,
						rb_qianxin_bihe_1,rb_qianxin_bihe_2,rb_qianxin_bihe_3,rb_qianxin_bihe_4,rb_qianxin_weibi_1,rb_qianxin_weibi_2,rb_qianxin_weibi_3,rb_qianxin_weibi_4,
						rb_jbbk_yes_1,rb_jbbk_yes_2,rb_jbbk_yes_3,rb_jbbk_no_1,rb_jbbk_no_2,rb_jbbk_no_3,
						rb_eye_no_1,rb_eye_no_2,rb_eye_no_3,rb_eye_no_4,rb_eye_yes_1,rb_eye_yes_2,rb_eye_yes_3,rb_eye_yes_4,
						rb_ear_no_1,rb_ear_no_2,rb_ear_no_3,rb_ear_no_4,rb_ear_yes_1,rb_ear_yes_2,rb_ear_yes_3,rb_ear_yes_4,
						rb_hearing_pass_3,rb_hearing_nopass_3,
						rb_oral_no_1,rb_oral_no_2,rb_oral_yes_1,rb_oral_yes_2,
						rb_card_no_1,rb_card_no_2,rb_card_no_3,rb_card_no_4,rb_card_yes_1,rb_card_yes_2,rb_card_yes_3,rb_card_yes_4,
						rb_fubu_no_1,rb_fubu_no_2,rb_fubu_no_3,rb_fubu_no_4,rb_fubu_yes_1,rb_fubu_yes_2,rb_fubu_yes_3,rb_fubu_yes_4,
						rb_qibu_weituo,rb_qibu_tuoluo,rb_qibu_shenchu,rb_qibu_other,rb_qibu_no_2,rb_qibu_yes_2,
						rb_leg_no_1,rb_leg_no_2,rb_leg_no_3,rb_leg_no_4,rb_leg_yes_1,rb_leg_yes_2,rb_leg_yes_3,rb_leg_yes_4;
	private EditText et_name,et_id,
					 et_date_1,et_date_2,et_date_3,et_date_4,
					 et_weight_1,et_weight_2,et_weight_3,et_weight_4,
					 et_height_1,et_height_2,et_height_3,et_height_4,
					 et_headsize_1,et_headsize_2,et_headsize_3,et_headsize_4,
					 et_qianxin_left_1,et_qianxin_left_2,et_qianxin_left_3,et_qianxin_left_4,et_qianxin_right_1,et_qianxin_right_2,et_qianxin_right_3,et_qianxin_right_4,
					 et_oral_3,et_oral_4;
	
	private RadioGroup rg_weight_1,rg_weight_2,rg_weight_3,rg_weight_4,
					   rg_height_1,rg_height_2,rg_height_3,rg_height_4,
					   rg_mianse_1,rg_mianse_2,rg_mianse_3,rg_mianse_4,
					   rg_skin_1,rg_skin_2,rg_skin_3,rg_skin_4,
					   rg_qianxin_1,rg_qianxin_2,rg_qianxin_3,rg_qianxin_4,
					   rg_jbbk_1,rg_jbbk_2,rg_jbbk_3,
					   rg_eye_1,rg_eye_2,rg_eye_3,rg_eye_4,
					   rg_ear_1, rg_ear_2, rg_ear_3, rg_ear_4,
					   rg_hearing_3,
					   rg_oral_1,rg_oral_2,
					   rg_card_1,rg_card_2,rg_card_3,rg_card_4,
					   rg_fubu_1,rg_fubu_2,rg_fubu_3,rg_fubu_4,
					   rg_qibu_2,
					   rg_leg_1,rg_leg_2,rg_leg_3,rg_leg_4;
					   
	
	HereTipa ht;
	OneChild oc1,oc2,oc3,oc4;
	
	public SmallOneChildView(Context context,int pro) {
		super(context);
		myContext=context;
		this.profileid=pro;
		paint=new Paint();
		paint.setStyle(Paint.Style.STROKE);
        paint.setColor(Color.BLACK);
	}
	
	
	/**
	 * 该函数用于使本类中定义的控件与布局文件中的控件相对应
	 */
	public void findWeidget(){
		LayoutInflater factory = LayoutInflater.from(myContext);
        v = factory.inflate(R.layout.smallone_child, null);
        
        ll1=(LinearLayout)v.findViewById(R.id.ll);
		rb_w_up_1=(RadioButton)v.findViewById(R.id.rb_sc_weight_up_1);
		et_name=(EditText)v.findViewById(R.id.et_smallone_child_name);
		et_id=(EditText)v.findViewById(R.id.et_smallone_child_id);
		et_name.setInputType(InputType.TYPE_NULL);
		et_id.setInputType(InputType.TYPE_NULL);
		et_date_1=(EditText)v.findViewById(R.id.et_so_date_1);
		et_date_2=(EditText)v.findViewById(R.id.et_so_date_2);
		et_date_3=(EditText)v.findViewById(R.id.et_so_date_3);
		et_date_4=(EditText)v.findViewById(R.id.et_so_date_4);
		et_date_1.setInputType(InputType.TYPE_NULL);
		et_date_2.setInputType(InputType.TYPE_NULL);
		et_date_3.setInputType(InputType.TYPE_NULL);
		et_date_4.setInputType(InputType.TYPE_NULL);
		et_weight_1=(EditText)v.findViewById(R.id.et_so_weight_1);
		et_weight_2=(EditText)v.findViewById(R.id.et_so_weight_2);
		et_weight_3=(EditText)v.findViewById(R.id.et_so_weight_3);
		et_weight_4=(EditText)v.findViewById(R.id.et_so_weight_4);
		rg_weight_1=(RadioGroup)v.findViewById(R.id.rg_sc_weight_1);
		rg_weight_2=(RadioGroup)v.findViewById(R.id.rg_sc_weight_2);
		rg_weight_3=(RadioGroup)v.findViewById(R.id.rg_sc_weight_3);
		rg_weight_4=(RadioGroup)v.findViewById(R.id.rg_sc_weight_4);
		rb_w_up_1=(RadioButton)v.findViewById(R.id.rb_sc_weight_up_1);
		rb_w_up_2=(RadioButton)v.findViewById(R.id.rb_sc_weight_up_2);
		rb_w_up_3=(RadioButton)v.findViewById(R.id.rb_sc_weight_up_3);
		rb_w_up_4=(RadioButton)v.findViewById(R.id.rb_sc_weight_up_4);
		rb_w_middle_1=(RadioButton)v.findViewById(R.id.rb_sc_weight_middle_1);
		rb_w_middle_2=(RadioButton)v.findViewById(R.id.rb_sc_weight_middle_2);
		rb_w_middle_3=(RadioButton)v.findViewById(R.id.rb_sc_weight_middle_3);
		rb_w_middle_4=(RadioButton)v.findViewById(R.id.rb_sc_weight_middle_4);
		rb_w_down_1=(RadioButton)v.findViewById(R.id.rb_sc_weight_down_1);
		rb_w_down_2=(RadioButton)v.findViewById(R.id.rb_sc_weight_down_2);
		rb_w_down_3=(RadioButton)v.findViewById(R.id.rb_sc_weight_down_3);
		rb_w_down_4=(RadioButton)v.findViewById(R.id.rb_sc_weight_down_4);
		et_height_1=(EditText)v.findViewById(R.id.et_sc_height_1);
		et_height_2=(EditText)v.findViewById(R.id.et_sc_height_2);
		et_height_3=(EditText)v.findViewById(R.id.et_sc_height_3);
		et_height_4=(EditText)v.findViewById(R.id.et_sc_height_4);
		rg_height_1=(RadioGroup)v.findViewById(R.id.rg_sc_height_1);
		rg_height_2=(RadioGroup)v.findViewById(R.id.rg_sc_height_2);
		rg_height_3=(RadioGroup)v.findViewById(R.id.rg_sc_height_3);
		rg_height_4=(RadioGroup)v.findViewById(R.id.rg_sc_height_4);
		rb_h_up_1=(RadioButton)v.findViewById(R.id.rb_sc_height_up_1);
		rb_h_up_2=(RadioButton)v.findViewById(R.id.rb_sc_height_up_2);
		rb_h_up_3=(RadioButton)v.findViewById(R.id.rb_sc_height_up_3);
		rb_h_up_4=(RadioButton)v.findViewById(R.id.rb_sc_height_up_4);
		rb_h_middle_1=(RadioButton)v.findViewById(R.id.rb_sc_height_middle_1);
		rb_h_middle_2=(RadioButton)v.findViewById(R.id.rb_sc_height_middle_2);
		rb_h_middle_3=(RadioButton)v.findViewById(R.id.rb_sc_height_middle_3);
		rb_h_middle_4=(RadioButton)v.findViewById(R.id.rb_sc_height_middle_4);
		rb_h_down_1=(RadioButton)v.findViewById(R.id.rb_sc_height_down_1);
		rb_h_down_2=(RadioButton)v.findViewById(R.id.rb_sc_height_down_2);
		rb_h_down_3=(RadioButton)v.findViewById(R.id.rb_sc_height_down_3);
		rb_h_down_4=(RadioButton)v.findViewById(R.id.rb_sc_height_down_4);
		et_headsize_1=(EditText)v.findViewById(R.id.et_sc_headsize_1);
		et_headsize_2=(EditText)v.findViewById(R.id.et_sc_headsize_2);
		et_headsize_3=(EditText)v.findViewById(R.id.et_sc_headsize_3);
		et_headsize_4=(EditText)v.findViewById(R.id.et_sc_headsize_4);
		rg_mianse_1=(RadioGroup)v.findViewById(R.id.rg_sc_mianse_1);
		rg_mianse_2=(RadioGroup)v.findViewById(R.id.rg_sc_mianse_2);
		rg_mianse_3=(RadioGroup)v.findViewById(R.id.rg_sc_mianse_3);
		rg_mianse_4=(RadioGroup)v.findViewById(R.id.rg_sc_mianse_4);
		rb_hong_1=(RadioButton)v.findViewById(R.id.rb_sc_mianse_hong_1);
		rb_hong_2=(RadioButton)v.findViewById(R.id.rb_sc_mianse_hong_2);
		rb_hong_3=(RadioButton)v.findViewById(R.id.rb_sc_mianse_hong_3);
		rb_hong_4=(RadioButton)v.findViewById(R.id.rb_sc_mianse_hong_4);
		rb_huang_1=(RadioButton)v.findViewById(R.id.rb_sc_mianse_huang_1);
		rb_huang_2=(RadioButton)v.findViewById(R.id.rb_sc_mianse_huang_2);
		rb_other_1=(RadioButton)v.findViewById(R.id.rb_sc_mianse_other_1);
		rb_other_2=(RadioButton)v.findViewById(R.id.rb_sc_mianse_other_2);
		rb_other_3=(RadioButton)v.findViewById(R.id.rb_sc_mianse_other_3);
		rb_other_4=(RadioButton)v.findViewById(R.id.rb_sc_mianse_other_4);
		rg_skin_1=(RadioGroup)v.findViewById(R.id.rg_sc_skin_1);
		rg_skin_2=(RadioGroup)v.findViewById(R.id.rg_sc_skin_2);
		rg_skin_3=(RadioGroup)v.findViewById(R.id.rg_sc_skin_3);
		rg_skin_4=(RadioGroup)v.findViewById(R.id.rg_sc_skin_4);
		rb_skin_no_1=(RadioButton)v.findViewById(R.id.rb_sc_skin_no_1);
		rb_skin_no_2=(RadioButton)v.findViewById(R.id.rb_sc_skin_no_2);
		rb_skin_no_3=(RadioButton)v.findViewById(R.id.rb_sc_skin_no_3);
		rb_skin_no_4=(RadioButton)v.findViewById(R.id.rb_sc_skin_no_4);
		rb_skin_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_skin_yes_1);
		rb_skin_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_skin_yes_2);
		rb_skin_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_skin_yes_3);
		rb_skin_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_skin_yes_4);
		rg_qianxin_1=(RadioGroup)v.findViewById(R.id.rg_sc_qianxin_1);
		rg_qianxin_2=(RadioGroup)v.findViewById(R.id.rg_sc_qianxin_2);
		rg_qianxin_3=(RadioGroup)v.findViewById(R.id.rg_sc_qianxin_3);
		rg_qianxin_4=(RadioGroup)v.findViewById(R.id.rg_sc_qianxin_4);
		rb_qianxin_bihe_1=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_bihe_1);
		rb_qianxin_bihe_2=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_bihe_2);
		rb_qianxin_bihe_3=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_bihe_3);
		rb_qianxin_bihe_4=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_bihe_4);
		rb_qianxin_weibi_1=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_weibi_1);
		rb_qianxin_weibi_2=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_weibi_2);
		rb_qianxin_weibi_3=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_weibi_3);
		rb_qianxin_weibi_4=(RadioButton)v.findViewById(R.id.rb_sc_qianxin_weibi_4);
		et_qianxin_left_1=(EditText)v.findViewById(R.id.et_sc_qianxin_left_1);
		et_qianxin_left_2=(EditText)v.findViewById(R.id.et_sc_qianxin_left_2);
		et_qianxin_left_3=(EditText)v.findViewById(R.id.et_sc_qianxin_left_3);
		et_qianxin_left_4=(EditText)v.findViewById(R.id.et_sc_qianxin_left_4);
		et_qianxin_right_1=(EditText)v.findViewById(R.id.et_sc_qianxin_right_1);
		et_qianxin_right_2=(EditText)v.findViewById(R.id.et_sc_qianxin_right_2);
		et_qianxin_right_3=(EditText)v.findViewById(R.id.et_sc_qianxin_right_3);
		et_qianxin_right_4=(EditText)v.findViewById(R.id.et_sc_qianxin_right_4);
		rg_jbbk_1=(RadioGroup)v.findViewById(R.id.rg_sc_jbbk_1);
		rg_jbbk_2=(RadioGroup)v.findViewById(R.id.rg_sc_jbbk_2);
		rg_jbbk_3=(RadioGroup)v.findViewById(R.id.rg_sc_jbbk_3);
		rb_jbbk_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_jbbk_yes_1);
		rb_jbbk_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_jbbk_yes_2);
		rb_jbbk_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_jbbk_yes_3);
		rb_jbbk_no_1=(RadioButton)v.findViewById(R.id.rb_sc_jbbk_no_1);
		rb_jbbk_no_2=(RadioButton)v.findViewById(R.id.rb_sc_jbbk_no_2);
		rb_jbbk_no_3=(RadioButton)v.findViewById(R.id.rb_sc_jbbk_no_3);
		rg_eye_1=(RadioGroup)v.findViewById(R.id.rg_sc_eye_1);
		rg_eye_2=(RadioGroup)v.findViewById(R.id.rg_sc_eye_2);
		rg_eye_3=(RadioGroup)v.findViewById(R.id.rg_sc_eye_3);
		rg_eye_4=(RadioGroup)v.findViewById(R.id.rg_sc_eye_4);
		rb_eye_no_1=(RadioButton)v.findViewById(R.id.rb_sc_eye_no_1);
		rb_eye_no_2=(RadioButton)v.findViewById(R.id.rb_sc_eye_no_2);
		rb_eye_no_3=(RadioButton)v.findViewById(R.id.rb_sc_eye_no_3);
		rb_eye_no_4=(RadioButton)v.findViewById(R.id.rb_sc_eye_no_4);
		rb_eye_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_eye_yes_1);
		rb_eye_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_eye_yes_2);
		rb_eye_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_eye_yes_3);
		rb_eye_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_eye_yes_4);
		rg_ear_1=(RadioGroup)v.findViewById(R.id.rg_sc_ear_1);
		rg_ear_2=(RadioGroup)v.findViewById(R.id.rg_sc_ear_2);
		rg_ear_3=(RadioGroup)v.findViewById(R.id.rg_sc_ear_3);
		rg_ear_4=(RadioGroup)v.findViewById(R.id.rg_sc_ear_4);
		rb_ear_no_1=(RadioButton)v.findViewById(R.id.rb_sc_ear_no_1);
		rb_ear_no_2=(RadioButton)v.findViewById(R.id.rb_sc_ear_no_2);
		rb_ear_no_3=(RadioButton)v.findViewById(R.id.rb_sc_ear_no_3);
		rb_ear_no_4=(RadioButton)v.findViewById(R.id.rb_sc_ear_no_4);
		rb_ear_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_ear_yes_1);
		rb_ear_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_ear_yes_2);
		rb_ear_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_ear_yes_3);
		rb_ear_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_ear_yes_4);
		rg_hearing_3=(RadioGroup)v.findViewById(R.id.rg_sc_hearing_3);
		rb_hearing_pass_3=(RadioButton)v.findViewById(R.id.rb_sc_hearing_pass_3);
		rb_hearing_nopass_3=(RadioButton)v.findViewById(R.id.rb_sc_hearing_nopass_3);
		rg_oral_1=(RadioGroup)v.findViewById(R.id.rg_sc_oral_1);
		rg_oral_2=(RadioGroup)v.findViewById(R.id.rg_sc_oral_2);
		rb_oral_no_1=(RadioButton)v.findViewById(R.id.rb_sc_oral_no_1);
		rb_oral_no_2=(RadioButton)v.findViewById(R.id.rb_sc_oral_no_2);
		rb_oral_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_oral_yes_1);
		rb_oral_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_oral_yes_2);
		et_oral_3=(EditText)v.findViewById(R.id.et_sc_oral_3);
		et_oral_4=(EditText)v.findViewById(R.id.et_sc_oral_4);
		rg_card_1=(RadioGroup)v.findViewById(R.id.rg_sc_card_1);
		rg_card_2=(RadioGroup)v.findViewById(R.id.rg_sc_card_2);
		rg_card_3=(RadioGroup)v.findViewById(R.id.rg_sc_card_3);
		rg_card_4=(RadioGroup)v.findViewById(R.id.rg_sc_card_4);
		rb_card_no_1=(RadioButton)v.findViewById(R.id.rb_sc_card_no_1);
		rb_card_no_2=(RadioButton)v.findViewById(R.id.rb_sc_card_no_2);
		rb_card_no_3=(RadioButton)v.findViewById(R.id.rb_sc_card_no_3);
		rb_card_no_4=(RadioButton)v.findViewById(R.id.rb_sc_card_no_4);
		rb_card_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_card_yes_1);
		rb_card_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_card_yes_2);
		rb_card_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_card_yes_3);
		rb_card_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_card_yes_4);
		rg_fubu_1=(RadioGroup)v.findViewById(R.id.rg_sc_fubu_1);
		rg_fubu_2=(RadioGroup)v.findViewById(R.id.rg_sc_fubu_2);
		rg_fubu_3=(RadioGroup)v.findViewById(R.id.rg_sc_fubu_3);
		rg_fubu_4=(RadioGroup)v.findViewById(R.id.rg_sc_fubu_4);
		rb_fubu_no_1=(RadioButton)v.findViewById(R.id.rb_sc_fubu_no_1);
		rb_fubu_no_2=(RadioButton)v.findViewById(R.id.rb_sc_fubu_no_2);
		rb_fubu_no_3=(RadioButton)v.findViewById(R.id.rb_sc_fubu_no_3);
		rb_fubu_no_4=(RadioButton)v.findViewById(R.id.rb_sc_fubu_no_4);
		rb_fubu_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_fubu_yes_1);
		rb_fubu_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_fubu_yes_2);
		rb_fubu_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_fubu_yes_3);
		rb_fubu_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_fubu_yes_4);
		rb_qibu_weituo=(RadioButton)v.findViewById(R.id.rb_sc_qibu_weituo);
		rb_qibu_tuoluo=(RadioButton)v.findViewById(R.id.rb_sc_qibu_tuoluo);
		rb_qibu_shenchu=(RadioButton)v.findViewById(R.id.rb_sc_qibu_shenchu);
		rb_qibu_other=(RadioButton)v.findViewById(R.id.rb_sc_qibu_other);
		rg_qibu_2=(RadioGroup)v.findViewById(R.id.rg_sc_qibu_2);
		rb_qibu_no_2=(RadioButton)v.findViewById(R.id.rb_sc_qibu_no_2);
		rb_qibu_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_qibu_yes_2);
		rg_leg_1=(RadioGroup)v.findViewById(R.id.rg_sc_leg_1);
		rg_leg_2=(RadioGroup)v.findViewById(R.id.rg_sc_leg_2);
		rg_leg_3=(RadioGroup)v.findViewById(R.id.rg_sc_leg_3);
		rg_leg_4=(RadioGroup)v.findViewById(R.id.rg_sc_leg_4);
		rb_leg_no_1=(RadioButton)v.findViewById(R.id.rb_sc_leg_no_1);
		rb_leg_no_2=(RadioButton)v.findViewById(R.id.rb_sc_leg_no_2);
		rb_leg_no_3=(RadioButton)v.findViewById(R.id.rb_sc_leg_no_3);
		rb_leg_no_4=(RadioButton)v.findViewById(R.id.rb_sc_leg_no_4);
		rb_leg_yes_1=(RadioButton)v.findViewById(R.id.rb_sc_leg_yes_1);
		rb_leg_yes_2=(RadioButton)v.findViewById(R.id.rb_sc_leg_yes_2);
		rb_leg_yes_3=(RadioButton)v.findViewById(R.id.rb_sc_leg_yes_3);
		rb_leg_yes_4=(RadioButton)v.findViewById(R.id.rb_sc_leg_yes_4);
		
		ht=new HereTipa(myContext);
		ht.selectNameAndCode(profileid);
		oc1=new OneChild(myContext);
		oc1.selectOneChild(profileid, 1);
		oc2=new OneChild(myContext);
		oc2.selectOneChild(profileid, 2);
		oc3=new OneChild(myContext);
		oc3.selectOneChild(profileid, 3);
		oc4=new OneChild(myContext);
		oc4.selectOneChild(profileid, 4);
	}
	
	public void selectData(){
		oc1.selectOneChild(profileid, 1);
		oc2.selectOneChild(profileid, 2);
		oc3.selectOneChild(profileid, 3);
		oc4.selectOneChild(profileid, 4);
	}
	
	
	/**
	 * 将定义的视图v添加到该类对应的视图中
	 */
	public void addToView(){
		LayoutParams lp=new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
		this.addView(v,lp);
		MyView mv=new MyView(myContext);
		this.addView(mv,lp);
		et_date_1.setOnClickListener(this);
		et_date_1.setOnFocusChangeListener(this);
		et_date_2.setOnClickListener(this);
		et_date_2.setOnFocusChangeListener(this);
		et_date_3.setOnClickListener(this);
		et_date_3.setOnFocusChangeListener(this);
		et_date_4.setOnClickListener(this);
		et_date_4.setOnFocusChangeListener(this);
		rb_qibu_weituo.setOnClickListener(this);
		rb_qibu_tuoluo.setOnClickListener(this);
		rb_qibu_shenchu.setOnClickListener(this);
		rb_qibu_other.setOnClickListener(this);
	}
	
	/**
	 * 根据从数据库中取得的数据来初始化各个控件的值
	 */
	public void initView(){
		
		if(ht.getHeti_name()!=null){
			et_name.setText(ht.getHeti_name());
		}
		if(ht.getHeti_here_id()!=null){
			et_id.setText(ht.getHeti_here_id());
		}
		et_date_1.setText(oc1.getOnch_date());
		if(oc1.getOnch_weig_value()>0){
			et_weight_1.setText(oc1.getOnch_weig_value()+"");
		}
		if(oc1.getOnch_weig_choi()>0){
			switch(oc1.getOnch_weig_choi()){
			case 1:
				rg_weight_1.check(0);
				rb_w_up_1.setChecked(true);
				break;
			case 2:
				rg_weight_1.check(1);
				rb_w_middle_1.setChecked(true);
				break;
			case 3:
				rg_weight_1.check(2);
				rb_w_down_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_heig_value()>0){
			et_height_1.setText(oc1.getOnch_heig_value()+"");
		}
		if(oc1.getOnch_heig_choi()>0){
			switch(oc1.getOnch_heig_choi()){
			case 1:
				rg_height_1.check(0);
				rb_h_up_1.setChecked(true);
				break;
			case 2:
				rg_height_1.check(1);
				rb_h_middle_1.setChecked(true);
				break;
			case 3:
				rg_height_1.check(2);
				rb_h_down_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_head_size()>0){
			et_headsize_1.setText(oc1.getOnch_head_size()+"");
		}
		if(oc1.getOnch_complexion()>0){
			switch(oc1.getOnch_complexion()){
			case 1:
				rg_mianse_1.check(0);
				rb_hong_1.setChecked(true);
				break;
			case 2:
				rg_mianse_1.check(1);
				rb_huang_1.setChecked(true);
				break;
			case 3:
				rg_mianse_1.check(2);
				rb_other_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_skin()>0){
			switch(oc1.getOnch_skin()){
			case 1:
				rg_skin_1.check(0);
				rb_skin_no_1.setChecked(true);
				break;
			case 2:
				rg_skin_1.check(1);
				rb_skin_yes_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_bregma_choi()>0){
			switch(oc1.getOnch_bregma_choi()){
				case 1:
					rg_qianxin_1.check(0);
					rb_qianxin_bihe_1.setChecked(true);
					break;
				case 2:
					rg_qianxin_1.check(1);
					rb_qianxin_weibi_1.setChecked(true);
					break;
			}
		}
		if(oc1.getOnch_bregma_left()>0){
			et_qianxin_left_1.setText(oc1.getOnch_bregma_left()+"");
		}
		if(oc1.getOnch_bregma_right()>0){
			et_qianxin_right_1.setText(oc1.getOnch_bregma_right()+"");
		}
		if(oc1.getOnch_neck_mass()>0){
			switch(oc1.getOnch_neck_mass()){
			case 1:
				rg_jbbk_1.check(0);
				rb_jbbk_yes_1.setChecked(true);
				break;
			case 2:
				rg_jbbk_1.check(1);
				rb_jbbk_no_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_eye_appearance()>0){
			switch(oc1.getOnch_eye_appearance()){
			case 1:
				rg_eye_1.check(0);
				rb_eye_no_1.setChecked(true);
				break;
			case 2:
				rg_eye_1.check(1);
				rb_eye_yes_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_ear_appearance()>0){
			switch(oc1.getOnch_ear_appearance()){
			case 1:
				rg_ear_1.check(0);
				rb_ear_no_1.setChecked(true);
				break;
			case 2:
				rg_ear_1.check(1);
				rb_ear_yes_1.setChecked(true);
				break;
				
			}
		}
		if(oc1.getOnch_oral()>0){
			switch(oc1.getOnch_oral()){
			case 1:
				rg_oral_1.check(0);
				rb_oral_no_1.setChecked(true);
				break;
			case 2:
				rg_oral_1.check(1);
				rb_oral_yes_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_card()>0){
			switch(oc1.getOnch_card()){
			case 1:
				rg_card_1.check(0);
				rb_card_no_1.setChecked(true);
				break;
			case 2:
				rg_card_1.check(1);
				rb_card_yes_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_abdomen()>0){
			switch(oc1.getOnch_abdomen()){
			case 1:
				rg_fubu_1.check(0);
				rb_fubu_no_1.setChecked(true);
				break;
			case 2:
				rg_fubu_1.check(1);
				rb_fubu_yes_1.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_umbilical()>0){
			switch(oc1.getOnch_umbilical()){
			case 1:
				rb_qibu_weituo.setChecked(true);
				break;
			case 2:
				rb_qibu_tuoluo.setChecked(true);
				break;
			case 3:
				rb_qibu_shenchu.setChecked(true);
				break;
			case 4:
				rb_qibu_other.setChecked(true);
				break;
			}
		}
		if(oc1.getOnch_legs()>0){
			switch(oc1.getOnch_legs()){
			case 1:
				rg_leg_1.check(0);
				rb_leg_no_1.setChecked(true);
				break;
			case 2:
				rg_leg_1.check(1);
				rb_leg_yes_1.setChecked(true);
				break;
			}
		}
		//3月龄
		//oc.selectOneChild(profileid, 2);
		et_date_2.setText(oc2.getOnch_date());
		if(oc2.getOnch_weig_value()>0){
			et_weight_2.setText(oc2.getOnch_weig_value()+"");
		}
		if(oc2.getOnch_weig_choi()>0){
			switch(oc2.getOnch_weig_choi()){
			case 1:
				rg_weight_2.check(0);
				rb_w_up_2.setChecked(true);
				break;
			case 2:
				rg_weight_2.check(1);
				rb_w_middle_2.setChecked(true);
				break;
			case 3:
				rg_weight_2.check(2);
				rb_w_down_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_heig_value()>0){
			et_height_2.setText(oc2.getOnch_heig_value()+"");
		}
		if(oc2.getOnch_heig_choi()>0){
			switch(oc2.getOnch_heig_choi()){
			case 1:
				rg_height_2.check(0);
				rb_h_up_2.setChecked(true);
				break;
			case 2:
				rg_height_2.check(1);
				rb_h_middle_2.setChecked(true);
				break;
			case 3:
				rg_height_2.check(2);
				rb_h_down_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_head_size()>0){
			et_headsize_2.setText(oc2.getOnch_head_size()+"");
		}
		if(oc2.getOnch_complexion()>0){
			switch(oc2.getOnch_complexion()){
			case 1:
				rg_mianse_2.check(0);
				rb_hong_2.setChecked(true);
				break;
			case 2:
				rg_mianse_2.check(1);
				rb_huang_2.setChecked(true);
				break;
			case 3:
				rg_mianse_2.check(2);
				rb_other_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_skin()>0){
			switch(oc2.getOnch_skin()){
			case 1:
				rg_skin_2.check(0);
				rb_skin_no_2.setChecked(true);
				break;
			case 2:
				rg_skin_2.check(1);
				rb_skin_yes_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_bregma_choi()>0){
			switch(oc2.getOnch_bregma_choi()){
				case 1:
					rg_qianxin_2.check(0);
					rb_qianxin_bihe_2.setChecked(true);
					break;
				case 2:
					rg_qianxin_2.check(1);
					rb_qianxin_weibi_2.setChecked(true);
					break;
			}
		}
		if(oc2.getOnch_bregma_left()>0){
			et_qianxin_left_2.setText(oc2.getOnch_bregma_left()+"");
		}
		if(oc2.getOnch_bregma_right()>0){
			et_qianxin_right_2.setText(oc2.getOnch_bregma_right()+"");
		}
		if(oc2.getOnch_neck_mass()>0){
			switch(oc2.getOnch_neck_mass()){
			case 1:
				rg_jbbk_2.check(0);
				rb_jbbk_yes_2.setChecked(true);
				break;
			case 2:
				rg_jbbk_2.check(1);
				rb_jbbk_no_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_eye_appearance()>0){
			switch(oc2.getOnch_eye_appearance()){
			case 1:
				rg_eye_2.check(0);
				rb_eye_no_2.setChecked(true);
				break;
			case 2:
				rg_eye_2.check(1);
				rb_eye_yes_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_ear_appearance()>0){
			switch(oc2.getOnch_ear_appearance()){
			case 1:
				rg_ear_2.check(0);
				rb_ear_no_2.setChecked(true);
				break;
			case 2:
				rg_ear_2.check(1);
				rb_ear_yes_2.setChecked(true);
				break;
				
			}
		}
		if(oc2.getOnch_oral()>0){
			switch(oc2.getOnch_oral()){
			case 1:
				rg_oral_2.check(0);
				rb_oral_no_2.setChecked(true);
				break;
			case 2:
				rg_oral_2.check(1);
				rb_oral_yes_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_card()>0){
			switch(oc2.getOnch_card()){
			case 1:
				rg_card_2.check(0);
				rb_card_no_2.setChecked(true);
				break;
			case 2:
				rg_card_2.check(1);
				rb_card_yes_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_abdomen()>0){
			switch(oc2.getOnch_abdomen()){
			case 1:
				rg_fubu_2.check(0);
				rb_fubu_no_2.setChecked(true);
				break;
			case 2:
				rg_fubu_2.check(1);
				rb_fubu_yes_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_umbilical()>0){
			switch(oc2.getOnch_umbilical()){
			case 1:
				rg_qibu_2.check(0);
				rb_qibu_no_2.setChecked(true);
				break;
			case 2:
				rg_qibu_2.check(1);
				rb_qibu_yes_2.setChecked(true);
				break;
			}
		}
		if(oc2.getOnch_legs()>0){
			switch(oc2.getOnch_legs()){
			case 1:
				rg_leg_2.check(0);
				rb_leg_no_2.setChecked(true);
				break;
			case 2:
				rg_leg_2.check(1);
				rb_leg_yes_2.setChecked(true);
				break;
			}
		}
		//6月龄
		//oc.selectOneChild(profileid, 3);
		et_date_3.setText(oc3.getOnch_date());
		if(oc3.getOnch_weig_value()>0){
			et_weight_3.setText(oc3.getOnch_weig_value()+"");
		}
		if(oc3.getOnch_weig_choi()>0){
			switch(oc3.getOnch_weig_choi()){
			case 1:
				rg_weight_3.check(0);
				rb_w_up_3.setChecked(true);
				break;
			case 2:
				rg_weight_3.check(1);
				rb_w_middle_3.setChecked(true);
				break;
			case 3:
				rg_weight_3.check(2);
				rb_w_down_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_heig_value()>0){
			et_height_3.setText(oc3.getOnch_heig_value()+"");
		}
		if(oc3.getOnch_heig_choi()>0){
			switch(oc3.getOnch_heig_choi()){
			case 1:
				rg_height_3.check(0);
				rb_h_up_3.setChecked(true);
				break;
			case 2:
				rg_height_3.check(1);
				rb_h_middle_3.setChecked(true);
				break;
			case 3:
				rg_height_3.check(2);
				rb_h_down_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_head_size()>0){
			et_headsize_3.setText(oc3.getOnch_head_size()+"");
		}
		if(oc3.getOnch_complexion()>0){
			switch(oc3.getOnch_complexion()){
			case 1:
				rg_mianse_3.check(0);
				rb_hong_3.setChecked(true);
				break;
			case 2:
				rg_mianse_3.check(1);
				rb_other_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_skin()>0){
			switch(oc3.getOnch_skin()){
			case 1:
				rg_skin_3.check(0);
				rb_skin_no_3.setChecked(true);
				break;
			case 2:
				rg_skin_3.check(1);
				rb_skin_yes_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_bregma_choi()>0){
			switch(oc3.getOnch_bregma_choi()){
				case 1:
					rg_qianxin_3.check(0);
					rb_qianxin_bihe_3.setChecked(true);
					break;
				case 2:
					rg_qianxin_3.check(1);
					rb_qianxin_weibi_3.setChecked(true);
					break;
			}
		}
		if(oc3.getOnch_bregma_left()>0){
			et_qianxin_left_3.setText(oc3.getOnch_bregma_left()+"");
		}
		if(oc3.getOnch_bregma_right()>0){
			et_qianxin_right_3.setText(oc3.getOnch_bregma_right()+"");
		}
		if(oc3.getOnch_neck_mass()>0){
			switch(oc3.getOnch_neck_mass()){
			case 1:
				rg_jbbk_3.check(0);
				rb_jbbk_yes_3.setChecked(true);
				break;
			case 2:
				rg_jbbk_3.check(1);
				rb_jbbk_no_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_eye_appearance()>0){
			switch(oc3.getOnch_eye_appearance()){
			case 1:
				rg_eye_3.check(0);
				rb_eye_no_3.setChecked(true);
				break;
			case 2:
				rg_eye_3.check(1);
				rb_eye_yes_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_ear_appearance()>0){
			switch(oc3.getOnch_ear_appearance()){
			case 1:
				rg_ear_3.check(0);
				rb_ear_no_3.setChecked(true);
				break;
			case 2:
				rg_ear_3.check(1);
				rb_ear_yes_3.setChecked(true);
				break;
				
			}
		}
		if(oc3.getOnch_hearing()>0){
			switch(oc3.getOnch_hearing()){
			case 1:
				rg_hearing_3.check(0);
				rb_hearing_pass_3.setChecked(true);
				break;
			case 2:
				rg_hearing_3.check(1);
				rb_hearing_nopass_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_oral()>0){
			et_oral_3.setText(oc3.getOnch_oral()+"");
		}
		if(oc3.getOnch_card()>0){
			switch(oc3.getOnch_card()){
			case 1:
				rg_card_3.check(0);
				rb_card_no_3.setChecked(true);
				break;
			case 2:
				rg_card_3.check(1);
				rb_card_yes_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_abdomen()>0){
			switch(oc3.getOnch_abdomen()){
			case 1:
				rg_fubu_3.check(0);
				rb_fubu_no_3.setChecked(true);
				break;
			case 2:
				rg_fubu_3.check(1);
				rb_fubu_yes_3.setChecked(true);
				break;
			}
		}
		if(oc3.getOnch_legs()>0){
			switch(oc3.getOnch_legs()){
			case 1:
				rg_leg_3.check(0);
				rb_leg_no_3.setChecked(true);
				break;
			case 2:
				rg_leg_3.check(1);
				rb_leg_yes_3.setChecked(true);
				break;
			}
		}
		//8月龄
		//oc.selectOneChild(profileid, 4);
		et_date_4.setText(oc4.getOnch_date());
		if(oc4.getOnch_weig_value()>0){
			et_weight_4.setText(oc4.getOnch_weig_value()+"");
		}
		if(oc4.getOnch_weig_choi()>0){
			switch(oc4.getOnch_weig_choi()){
			case 1:
				rg_weight_4.check(0);
				rb_w_up_4.setChecked(true);
				break;
			case 2:
				rg_weight_4.check(1);
				rb_w_middle_4.setChecked(true);
				break;
			case 3:
				rg_weight_4.check(2);
				rb_w_down_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_heig_value()>0){
			et_height_4.setText(oc4.getOnch_heig_value()+"");
		}
		if(oc4.getOnch_heig_choi()>0){
			switch(oc4.getOnch_heig_choi()){
			case 1:
				rg_height_4.check(0);
				rb_h_up_4.setChecked(true);
				break;
			case 2:
				rg_height_4.check(1);
				rb_h_middle_4.setChecked(true);
				break;
			case 3:
				rg_height_4.check(2);
				rb_h_down_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_head_size()>0){
			et_headsize_4.setText(oc4.getOnch_head_size()+"");
		}
		if(oc4.getOnch_complexion()>0){
			switch(oc4.getOnch_complexion()){
			case 1:
				rg_mianse_4.check(0);
				rb_hong_4.setChecked(true);
				break;
			case 2:
				rg_mianse_4.check(1);
				rb_other_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_skin()>0){
			switch(oc4.getOnch_skin()){
			case 1:
				rg_skin_4.check(0);
				rb_skin_no_4.setChecked(true);
				break;
			case 2:
				rg_skin_4.check(1);
				rb_skin_yes_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_bregma_choi()>0){
			switch(oc4.getOnch_bregma_choi()){
				case 1:
					rg_qianxin_4.check(0);
					rb_qianxin_bihe_4.setChecked(true);
					break;
				case 2:
					rg_qianxin_4.check(1);
					rb_qianxin_weibi_4.setChecked(true);
					break;
			}
		}
		if(oc4.getOnch_bregma_left()>0){
			et_qianxin_left_4.setText(oc4.getOnch_bregma_left()+"");
		}
		if(oc4.getOnch_bregma_right()>0){
			et_qianxin_right_4.setText(oc4.getOnch_bregma_right()+"");
		}
		if(oc4.getOnch_eye_appearance()>0){
			switch(oc4.getOnch_eye_appearance()){
			case 1:
				rg_eye_4.check(0);
				rb_eye_no_4.setChecked(true);
				break;
			case 2:
				rg_eye_4.check(1);
				rb_eye_yes_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_ear_appearance()>0){
			switch(oc4.getOnch_ear_appearance()){
			case 1:
				rg_ear_4.check(0);
				rb_ear_no_4.setChecked(true);
				break;
			case 2:
				rg_ear_4.check(1);
				rb_ear_yes_4.setChecked(true);
				break;
				
			}
		}
		if(oc4.getOnch_oral()>0){
			et_oral_4.setText(oc4.getOnch_oral()+"");
		}
		if(oc4.getOnch_card()>0){
			switch(oc4.getOnch_card()){
			case 1:
				rg_card_4.check(0);
				rb_card_no_4.setChecked(true);
				break;
			case 2:
				rg_card_4.check(1);
				rb_card_yes_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_abdomen()>0){
			switch(oc4.getOnch_abdomen()){
			case 1:
				rg_fubu_4.check(0);
				rb_fubu_no_4.setChecked(true);
				break;
			case 2:
				rg_fubu_4.check(1);
				rb_fubu_yes_4.setChecked(true);
				break;
			}
		}
		if(oc4.getOnch_legs()>0){
			switch(oc4.getOnch_legs()){
			case 1:
				rg_leg_4.check(0);
				rb_leg_no_4.setChecked(true);
				break;
			case 2:
				rg_leg_4.check(1);
				rb_leg_yes_4.setChecked(true);
				break;
			}
		}
	}
	
	/**
	 * @return返回true则保存成功，false则保存失败
	 * 该函数将本界面中个控件的值保存到数据库中
	 */
	public boolean saveView(){
		if(et_weight_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_weight_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_weight_1.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_weight_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_weight_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_weight_2.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_weight_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_weight_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_weight_3.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_weight_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_weight_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_weight_4.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_height_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_height_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_height_1.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_height_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_height_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_height_2.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_height_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_height_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_height_3.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_height_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_height_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_height_4.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_headsize_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_headsize_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_headsize_1.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_headsize_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_headsize_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_headsize_2.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_headsize_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_headsize_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_headsize_3.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_headsize_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_headsize_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_headsize_4.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_left_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_left_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_left_1.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_left_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_left_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_left_2.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_left_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_left_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_left_3.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_left_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_left_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_left_4.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_right_1.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_right_1.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_right_1.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_right_2.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_right_2.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_right_2.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_right_3.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_right_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_right_3.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_qianxin_right_4.getText().toString().replaceAll("\\s", "").length()>10||
				et_qianxin_right_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_qianxin_right_4.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_oral_3.getText().toString().replaceAll("\\s", "").length()>8||
				et_oral_3.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_oral_3.setError("输入的数据长度超过范围");
			return false;
		}
		if(et_oral_4.getText().toString().replaceAll("\\s", "").length()>8||
				et_oral_4.getText().toString().replaceAll("\\s", "").startsWith("-")){
			et_oral_4.setError("输入的数据长度超过范围");
			return false;
		}
		OneChild oc=new OneChild(myContext);
		oc.selectOneChild(profileid, 1);
		if(et_date_1.getText().toString().length()>0){
			oc.setOnch_date(et_date_1.getText().toString().replaceAll("\\s", ""));
		}
		if(et_weight_1.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_weig_value(Float.parseFloat(et_weight_1.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_w_up_1.isChecked()){
			oc.setOnch_weig_choi(1);
		}
		else if(rb_w_middle_1.isChecked()){
			oc.setOnch_weig_choi(2);
		}
		else if(rb_w_down_1.isChecked()){
			oc.setOnch_weig_choi(3);
		}
		if(et_height_1.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_heig_value(Float.parseFloat(et_height_1.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_h_up_1.isChecked()){
			oc.setOnch_heig_choi(1);
		}
		else if(rb_h_middle_1.isChecked()){
			oc.setOnch_heig_choi(2);
		}
		else if(rb_h_down_1.isChecked()){
			oc.setOnch_heig_choi(3);
		}
		if(et_headsize_1.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_head_size(Float.parseFloat(et_headsize_1.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_hong_1.isChecked()){
			oc.setOnch_complexion(1);
		}
		else if(rb_huang_1.isChecked()){
			oc.setOnch_complexion(2);
		}
		else if(rb_other_1.isChecked()){
			oc.setOnch_complexion(3);
		}
		if(rb_skin_no_1.isChecked()){
			oc.setOnch_skin(1);
		}
		else if(rb_skin_yes_1.isChecked()){
			oc.setOnch_skin(2);
		}
		if(rb_qianxin_bihe_1.isChecked()){
			oc.setOnch_bregma_choi(1);
		}
		else if(rb_qianxin_weibi_1.isChecked()){
			oc.setOnch_bregma_choi(2);
		}
		if(et_qianxin_left_1.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_bregma_left(Float.parseFloat(et_qianxin_left_1.getText().toString()));
		}
		if(et_qianxin_right_1.getText().toString().length()>0){
			oc.setOnch_bregma_right(Float.parseFloat(et_qianxin_right_1.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_jbbk_yes_1.isChecked()){
			oc.setOnch_neck_mass(1);
		}
		else if(rb_jbbk_no_1.isChecked()){
			oc.setOnch_neck_mass(2);
		}
		if(rb_eye_no_1.isChecked()){
			oc.setOnch_eye_appearance(1);
		}
		else if(rb_eye_yes_1.isChecked()){
			oc.setOnch_eye_appearance(2);
		}
		if(rb_ear_no_1.isChecked()){
			oc.setOnch_ear_appearance(1);
		}
		else if(rb_ear_yes_1.isChecked()){
			oc.setOnch_ear_appearance(2);
		}
		if(rb_oral_no_1.isChecked()){
			oc.setOnch_oral(1);
		}
		else if(rb_oral_yes_1.isChecked()){
			oc.setOnch_oral(2);
		}
		if(rb_card_no_1.isChecked()){
			oc.setOnch_card(1);
		}
		else if(rb_card_yes_1.isChecked()){
			oc.setOnch_card(2);
		}
		if(rb_fubu_no_1.isChecked()){
			oc.setOnch_abdomen(1);
		}
		else if(rb_fubu_yes_1.isChecked()){
			oc.setOnch_abdomen(2);
		}
		if(rb_qibu_weituo.isChecked()){
			oc.setOnch_umbilical(1);
		}
		else if(rb_qibu_tuoluo.isChecked()){
			oc.setOnch_umbilical(2);
		}
		else if(rb_qibu_shenchu.isChecked()){
			oc.setOnch_umbilical(3);
		}
		else if(rb_qibu_other.isChecked()){
			oc.setOnch_umbilical(4);
		}
		if(rb_leg_no_1.isChecked()){
			oc.setOnch_legs(1);
		}
		else if(rb_leg_yes_1.isChecked()){
			oc.setOnch_legs(2);
		}
		oc.updateOneChild(profileid, 1);
		//更新3月龄
		oc.selectOneChild(profileid, 2);
		if(et_date_2.getText().toString().length()>0){
			oc.setOnch_date(et_date_2.getText().toString().replaceAll("\\s", ""));
		}
		if(et_weight_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_weig_value(Float.parseFloat(et_weight_2.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_w_up_2.isChecked()){
			oc.setOnch_weig_choi(1);
		}
		else if(rb_w_middle_2.isChecked()){
			oc.setOnch_weig_choi(2);
		}
		else if(rb_w_down_2.isChecked()){
			oc.setOnch_weig_choi(3);
		}
		if(et_height_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_heig_value(Float.parseFloat(et_height_2.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_h_up_2.isChecked()){
			oc.setOnch_heig_choi(1);
		}
		else if(rb_h_middle_2.isChecked()){
			oc.setOnch_heig_choi(2);
		}
		else if(rb_h_down_2.isChecked()){
			oc.setOnch_heig_choi(3);
		}
		if(et_headsize_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_head_size(Float.parseFloat(et_headsize_2.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_hong_2.isChecked()){
			oc.setOnch_complexion(1);
		}
		else if(rb_huang_2.isChecked()){
			oc.setOnch_complexion(2);
		}
		else if(rb_other_2.isChecked()){
			oc.setOnch_complexion(3);
		}
		if(rb_skin_no_2.isChecked()){
			oc.setOnch_skin(1);
		}
		else if(rb_skin_yes_2.isChecked()){
			oc.setOnch_skin(2);
		}
		if(rb_qianxin_bihe_2.isChecked()){
			oc.setOnch_bregma_choi(1);
		}
		else if(rb_qianxin_weibi_2.isChecked()){
			oc.setOnch_bregma_choi(2);
		}
		if(et_qianxin_left_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_bregma_left(Float.parseFloat(et_qianxin_left_2.getText().toString().replaceAll("\\s", "")));
		}
		if(et_qianxin_right_2.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_bregma_right(Float.parseFloat(et_qianxin_right_2.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_jbbk_yes_2.isChecked()){
			oc.setOnch_neck_mass(1);
		}
		else if(rb_jbbk_no_2.isChecked()){
			oc.setOnch_neck_mass(2);
		}
		if(rb_eye_no_2.isChecked()){
			oc.setOnch_eye_appearance(1);
		}
		else if(rb_eye_yes_2.isChecked()){
			oc.setOnch_eye_appearance(2);
		}
		if(rb_ear_no_2.isChecked()){
			oc.setOnch_ear_appearance(1);
		}
		else if(rb_ear_yes_2.isChecked()){
			oc.setOnch_ear_appearance(2);
		}
		if(rb_oral_no_2.isChecked()){
			oc.setOnch_oral(1);
		}
		else if(rb_oral_yes_2.isChecked()){
			oc.setOnch_oral(2);
		}
		if(rb_card_no_2.isChecked()){
			oc.setOnch_card(1);
		}
		else if(rb_card_yes_2.isChecked()){
			oc.setOnch_card(2);
		}
		if(rb_fubu_no_2.isChecked()){
			oc.setOnch_abdomen(1);
		}
		else if(rb_fubu_yes_2.isChecked()){
			oc.setOnch_abdomen(2);
		}
		if(rb_qibu_no_2.isChecked()){
			oc.setOnch_umbilical(1);
		}
		else if(rb_qibu_yes_2.isChecked()){
			oc.setOnch_umbilical(2);
		}
		if(rb_leg_no_2.isChecked()){
			oc.setOnch_legs(1);
		}
		else if(rb_leg_yes_2.isChecked()){
			oc.setOnch_legs(2);
		}
		oc.updateOneChild(profileid, 2);
		//6月龄
		oc.selectOneChild(profileid, 3);
		if(et_date_3.getText().toString().length()>0){
			oc.setOnch_date(et_date_3.getText().toString().replaceAll("\\s", ""));
		}
		if(et_weight_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_weig_value(Float.parseFloat(et_weight_3.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_w_up_3.isChecked()){
			oc.setOnch_weig_choi(1);
		}
		else if(rb_w_middle_3.isChecked()){
			oc.setOnch_weig_choi(2);
		}
		else if(rb_w_down_3.isChecked()){
			oc.setOnch_weig_choi(3);
		}
		if(et_height_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_heig_value(Float.parseFloat(et_height_3.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_h_up_3.isChecked()){
			oc.setOnch_heig_choi(1);
		}
		else if(rb_h_middle_3.isChecked()){
			oc.setOnch_heig_choi(2);
		}
		else if(rb_h_down_3.isChecked()){
			oc.setOnch_heig_choi(3);
		}
		if(et_headsize_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_head_size(Float.parseFloat(et_headsize_3.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_hong_3.isChecked()){
			oc.setOnch_complexion(1);
		}
		else if(rb_other_3.isChecked()){
			oc.setOnch_complexion(2);
		}
		if(rb_skin_no_3.isChecked()){
			oc.setOnch_skin(1);
		}
		else if(rb_skin_yes_3.isChecked()){
			oc.setOnch_skin(2);
		}
		if(rb_qianxin_bihe_3.isChecked()){
			oc.setOnch_bregma_choi(1);
		}
		else if(rb_qianxin_weibi_3.isChecked()){
			oc.setOnch_bregma_choi(2);
		}
		if(et_qianxin_left_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_bregma_left(Float.parseFloat(et_qianxin_left_3.getText().toString().replaceAll("\\s", "")));
		}
		if(et_qianxin_right_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_bregma_right(Float.parseFloat(et_qianxin_right_3.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_jbbk_yes_3.isChecked()){
			oc.setOnch_neck_mass(1);
		}
		else if(rb_jbbk_no_3.isChecked()){
			oc.setOnch_neck_mass(2);
		}
		if(rb_eye_no_3.isChecked()){
			oc.setOnch_eye_appearance(1);
		}
		else if(rb_eye_yes_3.isChecked()){
			oc.setOnch_eye_appearance(2);
		}
		if(rb_ear_no_3.isChecked()){
			oc.setOnch_ear_appearance(1);
		}
		else if(rb_ear_yes_3.isChecked()){
			oc.setOnch_ear_appearance(2);
		}
		if(rb_hearing_pass_3.isChecked()){
			oc.setOnch_hearing(1);
		}
		else if(rb_hearing_nopass_3.isChecked()){
			oc.setOnch_hearing(2);
		}
		if(et_oral_3.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_oral(Integer.parseInt(et_oral_3.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_card_no_3.isChecked()){
			oc.setOnch_card(1);
		}
		else if(rb_card_yes_3.isChecked()){
			oc.setOnch_card(2);
		}
		if(rb_fubu_no_3.isChecked()){
			oc.setOnch_abdomen(1);
		}
		else if(rb_fubu_yes_3.isChecked()){
			oc.setOnch_abdomen(2);
		}
		if(rb_leg_no_3.isChecked()){
			oc.setOnch_legs(1);
		}
		else if(rb_leg_yes_3.isChecked()){
			oc.setOnch_legs(2);
		}
		oc.updateOneChild(profileid, 3);
		//8月龄
		oc.selectOneChild(profileid, 4);
		if(et_date_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_date(et_date_4.getText().toString().replaceAll("\\s", ""));
		}
		if(et_weight_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_weig_value(Float.parseFloat(et_weight_4.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_w_up_4.isChecked()){
			oc.setOnch_weig_choi(1);
		}
		else if(rb_w_middle_4.isChecked()){
			oc.setOnch_weig_choi(2);
		}
		else if(rb_w_down_4.isChecked()){
			oc.setOnch_weig_choi(3);
		}
		if(et_height_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_heig_value(Float.parseFloat(et_height_4.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_h_up_4.isChecked()){
			oc.setOnch_heig_choi(1);
		}
		else if(rb_h_middle_4.isChecked()){
			oc.setOnch_heig_choi(2);
		}
		else if(rb_h_down_4.isChecked()){
			oc.setOnch_heig_choi(3);
		}
		if(et_headsize_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_head_size(Float.parseFloat(et_headsize_4.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_hong_4.isChecked()){
			oc.setOnch_complexion(1);
		}
		else if(rb_other_4.isChecked()){
			oc.setOnch_complexion(2);
		}
		if(rb_skin_no_4.isChecked()){
			oc.setOnch_skin(1);
		}
		else if(rb_skin_yes_4.isChecked()){
			oc.setOnch_skin(2);
		}
		if(rb_qianxin_bihe_4.isChecked()){
			oc.setOnch_bregma_choi(1);
		}
		else if(rb_qianxin_weibi_4.isChecked()){
			oc.setOnch_bregma_choi(2);
		}
		if(et_qianxin_left_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_bregma_left(Float.parseFloat(et_qianxin_left_4.getText().toString().replaceAll("\\s", "")));
		}
		if(et_qianxin_right_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_bregma_right(Float.parseFloat(et_qianxin_right_4.getText().toString().replaceAll("\\s", "")));
		}
		
		if(rb_eye_no_4.isChecked()){
			oc.setOnch_eye_appearance(1);
		}
		else if(rb_eye_yes_4.isChecked()){
			oc.setOnch_eye_appearance(2);
		}
		if(rb_ear_no_4.isChecked()){
			oc.setOnch_ear_appearance(1);
		}
		else if(rb_ear_yes_4.isChecked()){
			oc.setOnch_ear_appearance(2);
		}
		if(et_oral_4.getText().toString().replaceAll("\\s", "").length()>0){
			oc.setOnch_oral(Integer.parseInt(et_oral_4.getText().toString().replaceAll("\\s", "")));
		}
		if(rb_card_no_4.isChecked()){
			oc.setOnch_card(1);
		}
		else if(rb_card_yes_4.isChecked()){
			oc.setOnch_card(2);
		}
		if(rb_fubu_no_4.isChecked()){
			oc.setOnch_abdomen(1);
		}
		else if(rb_fubu_yes_4.isChecked()){
			oc.setOnch_abdomen(2);
		}
		if(rb_leg_no_4.isChecked()){
			oc.setOnch_legs(1);
		}
		else if(rb_leg_yes_4.isChecked()){
			oc.setOnch_legs(2);
		}
		oc.updateOneChild(profileid, 4);
		return true;
	}
	
	class MyView extends View {
    	View v;
    	Paint paint;
    	
		public MyView(Context context) {
			super(context);
			paint=new Paint();
			paint.setStyle(Paint.Style.STROKE);
            paint.setColor(Color.BLACK);
		}
		
		@Override
		public void onDraw(Canvas c){
	        int top=ll1.getTop();
	        int left=ll1.getLeft()-15;
	        int right=ll1.getRight()+15;
	        int bottom=ll1.getBottom();
	        int y=0;//sv.getScrollY();
	        int height=rb_w_up_1.getHeight();
	        int height2=et_name.getHeight();
	        top=top-y;
	        bottom=bottom-y;
	        
	        c.drawLine(left, top+125, right, top+125, paint);
	        c.drawLine(left, top+135+1*height, right, top+135+1*height, paint);
	        c.drawLine(left, top+135+1*30+1*height+1*height2, right, top+135+1*30+1*height+1*height2, paint);
	        c.drawLine(left, top+140+2*30+2*height+2*height2, right, top+140+2*30+2*height+2*height2, paint);
	        c.drawLine(left, top+145+3*30+3*height+3*height2, right, top+145+3*30+3*height+3*height2, paint);
	        c.drawLine(left, top+145+4*30+3*height+4*height2, right, top+145+4*30+3*height+4*height2, paint);
	        c.drawLine(left+35, top+145+5*30+4*height+4*height2, right, top+145+5*30+4*height+4*height2, paint);
	        c.drawLine(left+35, top+145+6*30+5*height+4*height2, right, top+145+6*30+5*height+4*height2, paint);
	        c.drawLine(left+35, top+150+7*30+6*height+5*height2, right, top+150+7*30+6*height+5*height2, paint);
	        c.drawLine(left+35, top+150+8*30+7*height+5*height2, right, top+150+8*30+7*height+5*height2, paint);
	        c.drawLine(left+35, top+150+9*30+8*height+5*height2, right, top+150+9*30+8*height+5*height2, paint);
	        c.drawLine(left+35, top+150+10*30+9*height+5*height2, right, top+150+10*30+9*height+5*height2, paint);
	        c.drawLine(left+35, top+150+11*30+10*height+5*height2, right, top+150+11*30+10*height+5*height2, paint);
	        c.drawLine(left+35, top+150+12*30+10*height+6*height2, right, top+150+12*30+10*height+6*height2, paint);
	        c.drawLine(left+35, top+150+13*30+11*height+6*height2, right, top+150+13*30+11*height+6*height2, paint);
	        c.drawLine(left+35, top+150+14*30+12*height+6*height2, right, top+150+14*30+12*height+6*height2, paint);
	        c.drawLine(left+35, top+155+15*30+14*height+6*height2, right, top+155+15*30+14*height+6*height2, paint);
	        c.drawLine(left, top+155+16*30+15*height+6*height2, right, top+155+16*30+15*height+6*height2, paint);
	        
	        c.drawLine(left, top+125, left, top+155+16*30+15*height+6*height2, paint);
	        c.drawLine(right, top+125, right, top+155+16*30+15*height+6*height2, paint);
	        c.drawLine(left+110, top+125, left+110, top+155+16*30+15*height+6*height2, paint);
	        c.drawLine(left+270, top+125, left+270, top+155+16*30+15*height+6*height2, paint);
	        c.drawLine(left+430, top+125, left+430, top+155+16*30+15*height+6*height2, paint);
	        c.drawLine(left+590, top+125, left+590, top+155+16*30+15*height+6*height2, paint);
	        c.drawLine(left+35, top+145+4*30+3*height+4*height2, left+35, top+155+16*30+15*height+6*height2, paint);
	        
		}
    	
    }

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v==rb_qibu_weituo){
			rb_qibu_weituo.setChecked(true);
			rb_qibu_tuoluo.setChecked(false);
			rb_qibu_shenchu.setChecked(false);
			rb_qibu_other.setChecked(false);
		}
		else if(v==rb_qibu_tuoluo){
			rb_qibu_weituo.setChecked(false);
			rb_qibu_tuoluo.setChecked(true);
			rb_qibu_shenchu.setChecked(false);
			rb_qibu_other.setChecked(false);
		}
		else if(v==rb_qibu_shenchu){
			rb_qibu_weituo.setChecked(false);
			rb_qibu_tuoluo.setChecked(false);
			rb_qibu_shenchu.setChecked(true);
			rb_qibu_other.setChecked(false);
		}
		else if(v==rb_qibu_other){
			rb_qibu_weituo.setChecked(false);
			rb_qibu_tuoluo.setChecked(false);
			rb_qibu_shenchu.setChecked(false);
			rb_qibu_other.setChecked(true);
		}
		else if(v==et_date_1){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_1), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_1.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_date_2){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_2), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_2.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_date_3){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_3), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_3.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_date_4){
			mPopupWindow = new MyPopupWindow(myContext);			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_4), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_4.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
	}


	@Override
	public void onFocusChange(View v, boolean hasFocus) {
		// TODO Auto-generated method stub
		if(v==et_date_1&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_1  ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_1.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_date_2&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_2  ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_2.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_date_3&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_3  ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_3.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
		else if(v==et_date_4&&hasFocus){
			mPopupWindow = new MyPopupWindow(getContext());			
			mPopupWindow.showAtLocation(v.findViewById(R.id.et_so_date_4  ), Gravity.CENTER, 0, 0);

			Button btn=mPopupWindow.getButton();
			btn.setOnClickListener(new OnClickListener(){

				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					et_date_4.setText(mPopupWindow.getDate());
					mPopupWindow.dismiss();
				}
				
			});
		}
	}
}
